Skip to content

drivers: flash: nrf_qspi_nor: Prevent CPU hang when XIP is re-enabled#88967

Merged
kartben merged 1 commit intozephyrproject-rtos:mainfrom
anangl:fix_nrf53_xip_hang
Apr 25, 2025
Merged

drivers: flash: nrf_qspi_nor: Prevent CPU hang when XIP is re-enabled#88967
kartben merged 1 commit intozephyrproject-rtos:mainfrom
anangl:fix_nrf53_xip_hang

Conversation

@anangl
Copy link
Copy Markdown
Member

@anangl anangl commented Apr 23, 2025

Add a simple non-XIP transaction before deactivating the QSPI after a XIP transaction is performed. This prevents a CPU hang from occuring when another XIP transaction is attempted after the QSPI is activated again.

Add a simple non-XIP transaction before deactivating the QSPI after
a XIP transaction is performed. This prevents a CPU hang from occuring
when another XIP transaction is attempted after the QSPI is activated
again.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Comment on lines +1363 to +1372
/* It turns out that when the QSPI peripheral is deactivated
* after a XIP transaction, it cannot be later successfully
* reactivated and an attempt to perform another XIP transaction
* results in the CPU being hung; even a debug session cannot be
* started then and the SoC has to be recovered.
* As a workaround, at least until the cause of such behavior
* is fully clarified, perform a simple non-XIP transaction
* (a read of the status register) before deactivating the QSPI.
* This prevents the issue from occurring.
*/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like the issue I observed/reported years ago on nrf52840...

@kartben kartben merged commit fb1d078 into zephyrproject-rtos:main Apr 25, 2025
25 checks passed
@anangl anangl deleted the fix_nrf53_xip_hang branch April 25, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants